﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="viewDataLayerProductSite.aspx.cs" Inherits="Pc_Vision.View_Datalayer_Site.viewDataLayerProductSite" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- #include file="load.aspx"  -->
</head>
<body>
    <!-- #include file="header.aspx" -->
<form id="Form1" runat="server">
    <table style="margin-left:535px;">
        <tr><td style="width:300px;"><asp:Label ID="Label1" runat="server" Text="Product naam:" /></td>
        <td><asp:Label ID="productName" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label2" runat="server" Text="Artikelnummer:" /></td>
        <td><asp:Label ID="articleNumber" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label3" runat="server" Text="Product omschrijving:" /></td>
        <td><asp:Label ID="productDescription" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label4" runat="server" Text="Systeem type:" /></td>
        <td><asp:Label ID="systemType" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label5" runat="server" Text="Processor" /></td>
        <td><asp:Label ID="processor" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label6" runat="server" Text="Werkgeheugen:" /></td>
        <td><asp:Label ID="memory" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label7" runat="server" Text="Opslag" /></td>
        <td><asp:Label ID="storage" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label8" runat="server" Text="Optische schijf:" /></td>
        <td><asp:Label ID="opticalDisk" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label9" runat="server" Text="Resolutie:" /></td>
        <td><asp:Label ID="display" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label10" runat="server" Text="Videokaart:" /></td>
        <td><asp:Label ID="videoCard" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label11" runat="server" Text="Netwerk kaart:" /></td>
        <td><asp:Label ID="networkCard" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label12" runat="server" Text="Batterij duur:" /></td>
        <td><asp:Label ID="battery" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label13" runat="server" Text="Afmetingen:" /></td>
        <td><asp:Label ID="dimension" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label14" runat="server" Text="Gewicht:" /></td>
        <td><asp:Label ID="weight" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label15" runat="server" Text="Garantie:" /></td>
        <td><asp:Label ID="warranty" runat="server" Text="........." /></td></tr>

        <tr><td style="width:300px;"><asp:Label ID="Label16" runat="server" Text="Op voorraad:" /></td>
        <td><asp:Label ID="inStock" runat="server" Text="........." /></td></tr>
        
        <tr><td style="width:300px;"><asp:Label ID="Label17" runat="server" Text="Prijs:" /></td>
        <td><asp:Label ID="sellPrice" runat="server" Text="........." /></td></tr>

        
        <tr><td><asp:Button ID="Button1" Text="Voeg toe aan winkelmandje" runat="server" OnClick="fn_GetProduct" /></td></tr>
    </table>

    <asp:Label ID ="lblProductValue" runat="server" />
    <asp:Label ID="lblActieValue" runat="server" />

    <asp:Button ID="btnCategorie" Text="...." runat="server" OnClick ="fn_GetCategories" />
    <asp:Button ID="btnActie" Text="...." runat="server" OnClick="fn_GetActies" />

        </form>
</body>
</html>


<script type="text/javascript">

    $(document).ready(function () {
        $('#btnCategorie').hide();
        $('#lblProductValue').hide();
        $('#lblActieValue').hide();
        $('#btnActie').hide();

        var checkProduct = localStorage.getItem('checkProduct');
        var checkActie = localStorage.getItem('checkActie');
        if (checkProduct == 'check') {
            if (checkActie == 'check') { }
            else {
                $('#btnActie').click();
            }
        }
        else { $('#btnCategorie').click(); }

        var valueProduct = $('#lblProductValue').html();
        var valueActie = $('#lblActieValue').html();

        $('#ulProduct').append(valueProduct);
        $('#ulActie').append(valueActie);
    });

    $('#btnCategorie').click(function () {
        localStorage.setItem('checkProduct', 'check');
    });

    $('#btnActie').click(function () {
        localStorage.setItem('checkActie', 'check');
    });

    function fn_ClearLocal() {
        localStorage.clear();
    }

</script>